<template>
  <div>

    <md-button type="primary" @click="selectEnterpriseContact">通讯录选人</md-button>
    <md-button type="primary" @click="getCurExternalContact">获取当前外部联系人userid</md-button>
    <md-button type="primary" @click="sendChatMessage">聊天工具栏分享消息到会话</md-button>
  </div>
</template>
<script>
  import {
    Button
  } from 'mand-mobile'
  import wxwork from '@/utils/wxwork'
  export default {
    components: {
      [Button.name]: Button
    },
    methods: {
      selectEnterpriseContact() {
        wxwork.selectEnterpriseContact().then(res => {
          console.log(res)
        })
      },
      getCurExternalContact() {
        wxwork.getCurExternalContact().then(res => {
          console.log(res)
        })
      },
      sendChatMessage() {
        wxwork.sendChatMessage({
          msgtype: 'text',
          text: {
            content: '测试测试测试测试', //文本内容
          },
        }).then(res => {
          console.log(res)
        })
      }
    }
  }
</script>
<style lang="less" scoped>

</style>